home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
util
/
gnu
/
emacs_src.lha
/
emacs-18.58
/
lisp
/
prolog.elc
< prev
next >
Wrap
Text File
|
1992-02-21
|
6KB
|
102 lines
(defvar prolog-mode-syntax-table nil)
(defvar prolog-mode-abbrev-table nil)
(defvar prolog-mode-map nil)
(defvar prolog-consult-string "reconsult(user).
" "*(Re)Consult mode (for C-Prolog and Quintus Prolog). ")
(defvar prolog-compile-string "compile(user).
" "*Compile mode (for Quintus Prolog).")
(defvar prolog-eof-string "end_of_file.
" "*String that represents end of file for prolog.
nil means send actual operaing system end of file.")
(defvar prolog-indent-width 4)
(if prolog-mode-syntax-table nil (let ((table (make-syntax-table))) (modify-syntax-entry 95 "w" table) (modify-syntax-entry 92 "\\" table) (modify-syntax-entry 47 "." table) (modify-syntax-entry 42 "." table) (modify-syntax-entry 43 "." table) (modify-syntax-entry 45 "." table) (modify-syntax-entry 61 "." table) (modify-syntax-entry 37 "<" table) (modify-syntax-entry 60 "." table) (modify-syntax-entry 62 "." table) (modify-syntax-entry 39 "\"" table) (setq prolog-mode-syntax-table table)))
(define-abbrev-table (quote prolog-mode-abbrev-table) nil)
(defun prolog-mode-variables nil (byte-code "Í!
ÎÃ!ÏPÎÅ!ÎÆ!ÇÎÈ!ÐÎÉ!Ñ ÎÊ!Ò
ÎË!ÓÎÌ!Ô" [prolog-mode-syntax-table local-abbrev-table prolog-mode-abbrev-table paragraph-start page-delimiter paragraph-separate paragraph-ignore-fill-prefix t indent-line-function comment-start comment-start-skip comment-column comment-indent-hook set-syntax-table make-local-variable "^%%\\|^$\\|" prolog-indent-line "%" "%+ *" 48 prolog-comment-indent] 11))
(defun prolog-mode-commands (map) (byte-code "ÁÂÃ#ÁÄÅ#" [map define-key " " prolog-indent-line "" prolog-consult-region] 5))
(if prolog-mode-map nil (setq prolog-mode-map (make-sparse-keymap)) (prolog-mode-commands prolog-mode-map))
(defun prolog-mode nil "\
Major mode for editing Prolog code for Prologs.
Blank lines and `%%...' separate paragraphs. `%'s start comments.
Commands:
\\{prolog-mode-map}
Entry to this mode calls the value of prolog-mode-hook
if that value is non-nil." (interactive) (byte-code "ÃÄ Å!ÆÇÈ ÉÊ!" [prolog-mode-map major-mode mode-name nil kill-all-local-variables use-local-map prolog-mode "Prolog" prolog-mode-variables run-hooks prolog-mode-hook] 5))
(defun prolog-indent-line (&optional whole-exp) "\
Indent current line as Prolog code.
With argument, indent any additional lines of the same clause
rigidly along with this one (not yet)." (interactive "p") (byte-code "ÃÄ d`ZÃÅ `ÆÇ!ÈiZ!\" Ã) É
`\"jd Z`V 6 d Zb+" [indent pos beg nil prolog-indent-level beginning-of-line skip-chars-forward " " zerop delete-region] 7))
(defun prolog-indent-level nil "\
Compute prolog indentation level." (byte-code "É ÊË!ÌÍ! ÎÛ ÌÏ! Û o$ ÎÛ ÁÆÆÆÌÐ!8 Á; Æ
i ÑÒ!É oQ Æe ÊË!ÌÏ!^ ÌÓ!? e Æ<